﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Ctrl_Personas.ascx.vb" Inherits="CtrlUsr_Ctrl_Personas" %>
<style type="text/css">
    .style1
    {
        height: 17px;
        width: 468px;
    }
        .style2
        {
            width: 141px;
        }
        .style7
        {
            width: 9px;
        }
        .style5
        {
            width: 126px;
        }
        .style8
        {
            width: 138px;
        }
        .style9
    {
        height: 17px;
    }
    .style10
    {
        height: 17px;
        width: 42px;
    }
    .style11
    {
        height: 17px;
        width: 33px;
    }
    .style12
    {
        height: 17px;
        width: 123px;
    }
</style>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="demoarea">
<asp:Label ID="msg" runat="server" Text="" Width="90%"></asp:Label>
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
<asp:View ID="vwPanel" runat="server"> 
<table style="width:550px;">
    <tr>
        <td colspan="3" class="TbDecl">
            <asp:Label ID="lbEstado" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td class="style1">
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                SkinID="ValidationSummary1" ValidationGroup="GuardarTer" 
                CssClass="validacion" />
        </td>
        <td class="style10">
            <asp:ImageButton ID="btGuardar" runat="server" 
                ImageUrl="~/Imagenes/save.png" ValidationGroup="GuardarTer" Height="32px" 
                Width="32px" />
        </td>
        <td class="style11">
            <asp:ImageButton ID="btCancelar" runat="server" 
                ImageUrl="~/Imagenes/undo_.png" Height="32px" Width="32px" />
        </td>
    </tr>
</table>
    <table style="width:100%;">
        <tr>
            <td class="style12">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style7">
                &nbsp;</td>
            <td class="style5">
                &nbsp;</td>
            <td class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style12">
                Tipo de Documento</td>
            <td class="style2">
                <asp:DropDownList ID="CmbTipDoc" runat="server" DataSourceID="ObjTipDoc" 
                    DataTextField="Nom_Tipo" DataValueField="Cod_Tipo">
                </asp:DropDownList>
                <asp:ObjectDataSource ID="ObjTipDoc" runat="server" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetRecords" 
                    TypeName="TipDocumento"></asp:ObjectDataSource>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td class="style5">
                Documento</td>
            <td class="style8">
                <asp:TextBox ID="TxtCed" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="TxtCed" ErrorMessage="Debe escribir el Documento" 
                    ForeColor="Red" ValidationGroup="Guardar">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style12">
                Primer Nombre</td>
            <td class="style2">
                <asp:TextBox ID="TxtNom1" runat="server"></asp:TextBox>
            </td>
            <td class="style7">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="TxtNom1" ErrorMessage="Debe escribir el Primer Nombre" 
                    ForeColor="Red" ValidationGroup="Guardar">*</asp:RequiredFieldValidator>
            </td>
            <td class="style5">
                Segundo Nombre</td>
            <td class="style8">
                <asp:TextBox ID="TxtNom2" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style12">
                Primer Apellido</td>
            <td class="style2">
                <asp:TextBox ID="TxtApe1" runat="server"></asp:TextBox>
            </td>
            <td class="style7">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="TxtApe1" ErrorMessage="Debe escribir el Primer Apellido" 
                    ForeColor="Red" ValidationGroup="Guardar">*</asp:RequiredFieldValidator>
            </td>
            <td class="style5">
                Segundo Apellido</td>
            <td class="style8">
                <asp:TextBox ID="TxtApe2" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style12">
                Dirección</td>
            <td class="style2">
                <asp:TextBox ID="TxtDir" runat="server"></asp:TextBox>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td class="style5">
                Télefono</td>
            <td class="style8">
                <asp:TextBox ID="TxtTel" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style12">
                Celular</td>
            <td class="style2">
                <asp:TextBox ID="TxtCel" runat="server"></asp:TextBox>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td class="style5">
                E-Mail</td>
            <td class="style8">
                <asp:TextBox ID="TxtEma" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="TxtEma" 
                    ErrorMessage="El correo debe tener el formato Correo@dominio.com" 
                    ForeColor="Red" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="Guardar">*</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style12">
                Sexo</td>
            <td class="style2">
                <asp:DropDownList ID="CmbSexo" runat="server">
                    <asp:ListItem Value="M">MASCULINO</asp:ListItem>
                    <asp:ListItem Value="F">FEMENINO</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td class="style5">
                Fecha de Nacimiento</td>
            <td class="style8">
                <asp:TextBox ID="DtpFecNac" runat="server"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="DtpFecNac_CalendarExtender" runat="server" 
                    Enabled="True" Format="dd/MM/yyyy" TargetControlID="DtpFecNac">
                </ajaxToolkit:CalendarExtender>
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <br />
<asp:HiddenField ID="hfTransaccion" runat="server" />
    <asp:ObjectDataSource ID="ObjClase" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetRecords" 
        TypeName="TiposIde"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjTipoP" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetRecords" 
        TypeName="TipoMinistros"></asp:ObjectDataSource>
    <asp:HiddenField ID="hfPk1" runat="server" />
</asp:View> 
<asp:View ID="vwLista" runat="server"> 
    <table style="width: 550px;">
        <tr>
            <td>
                Buscar:</td>
            <td>
                <asp:TextBox ID="tbBuscaNomLinea" runat="server" Width="400px"></asp:TextBox>
            </td>
            <td>
                <asp:ImageButton ID="btBuscar" runat="server" 
                    ImageUrl="~/Imagenes/search.png" Height="32px" Width="32px" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:LinkButton ID="btNuevo" runat="server">Nuevo</asp:LinkButton>
            </td>
        </tr>
    </table>
    <asp:GridView ID="gvConsulta" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" DataKeyNames="Cedula" 
        DataSourceID="odsActores" CellPadding="4" 
        ForeColor="#333333" GridLines="None" PageSize="5" ShowFooter="True" 
        SkinID="gridView">
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <Columns>
                     <asp:BoundField DataField="Nom_Tip_Doc" HeaderText="Tipo de Documento" />
                            <asp:BoundField DataField="Cedula" HeaderText="Documento" />
                            <asp:BoundField DataField="Nombre" HeaderText="Nombre" />
                            <asp:BoundField DataField="Direccion" HeaderText="Dirección" />
                            <asp:BoundField DataField="Telefono" HeaderText="Telefono" />
                            <asp:BoundField DataField="Celular" HeaderText="Celular" />
                            <asp:BoundField DataField="Email" HeaderText="E-Mail" />
                            <asp:BoundField DataField="Sexo" HeaderText="Sexo" />
                            <asp:BoundField DataField="Fecha_Nacimiento" DataFormatString="{0:d}" 
                                HeaderText="Fecha de Nacimiento" />
                    <asp:ButtonField ButtonType="Image" CommandName="Editar" 
                        ImageUrl="~/imagenes/Editar.png" Text="Editar" >              
                        <controlstyle height="32px" width="32px" />                        
                    </asp:ButtonField>
                    <asp:CommandField ButtonType="Image" 
                        SelectImageUrl="~/imagenes/Tick.png" ShowSelectButton="True" />
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle CssClass="GridFooter"/>
                <HeaderStyle CssClass="GridHeader" />
                <PagerStyle CssClass="GridFooter"/>
                <RowStyle CssClass="GridRow" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            </asp:GridView>
    <asp:ObjectDataSource ID="odsActores" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetPersonas" 
        TypeName="Personas">
        <SelectParameters>
            <asp:ControlParameter ControlID="tbBuscaNomLinea" Name="Buscar" 
                PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:View> 
</asp:MultiView> 
</div>
</ContentTemplate>
</asp:UpdatePanel> 
